home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 16 / qmac11a.zip / MACROS.PAS < prev    next >
Pascal/Delphi Source File  |  1988-04-17  |  2KB  |  43 lines

  1. *
  2. *  All of these macros assume that QEdit 2 is in Insert and Indent modes.
  3. *  They all involve putting the cursor at the end of a piece of text and
  4. *  then pressing the assigned key. Here, the "piece of text" is represented
  5. *  by "foo". The cursor would be after the second "o" when the macro key
  6. *  would be pressed.
  7. *
  8. *  @p creates a commented procedure block
  9. *            procedure foo;
  10. *            begin {foo}
  11. *            end; {foo}
  12. *
  13. @p            macrobegin markblockend wordleft markblockbegin endline return copyblock endline return copyblock unmarkblock "end; {" endline "}" cursorup endline "}" wordleft "begin {" cursorup endline ";" wordleft "procedure " endline cursorleft
  14. *
  15. *  @f creates a commented function block
  16. *            function foo : ;
  17. *            begin {foo}
  18. *            end; {foo}
  19. *
  20. @f            macrobegin markblockend wordleft markblockbegin endline return copyblock endline return copyblock unmarkblock "end; {" endline "}" cursorup endline "}" wordleft "begin {" cursorup endline ";" wordleft "function " endline cursorleft " : "
  21. *
  22. *  @w creates a commented while block
  23. *            while foo do begin
  24. *
  25. *            end; {while foo}
  26. *
  27. @w            macrobegin begline wordright "while " wordleft markblockbegin endline markblockend return copyblock unmarkblock "end; {" endline "}" cursorup endline " do begin" return " "
  28. *
  29. *  @r creates a commented repeat block
  30. *            repeat {foo}
  31. *
  32. *            until foo;
  33. *
  34. @r            macrobegin begline wordright "repeat {" markblockbegin endline markblockend "}" return "until " copyblock endline ";" unmarkblock cursorup endline return "  "
  35. *
  36. *  @b creates a commented begin-end block
  37. *            begin {foo}
  38. *
  39. *            end; {foo}
  40. *
  41. @b            macrobegin wordleft "begin {" cursorleft markblockbegin endline "}" markblockend return "end; " copyblock unmarkblock cursorup endline return "  "
  42. *
  43.